package com.cn.qgx428.lazydiary.local

import android.support.v4.util.Pools

/**
 * Created by qinguanxiong on 2018/1/14.
 */
class LAMessege {
    var msg = ""
    var arg1 = ""
    var arg2 = ""
    var argObject = Any()

    companion object {
        var POOL_SIZE = 3
        var EventPool = Pools.SynchronizedPool<LAMessege>(POOL_SIZE)

        fun obtain() = {
            var builder = EventPool.acquire() as LAMessege
            if (builder == null)
                builder = LAMessege()
            builder
        }
    }

    fun release(){
        msg = ""
        var arg1 = ""
        var arg2 = ""
        argObject = Any()
    }
}